package tech.wetech.admin.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.stereotype.Component;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@ApiModel(value="LoginDTO",description="登录请求实体")
public class LoginDTO implements Serializable {

    @ApiModelProperty(value="用户名",hidden=false,name="username")
    @NotNull(message = "用户名不能为空")
    @Length(max = 12,message = "用户名长度不能超过12位")
    private String username;

    @ApiModelProperty(value="密码",name="password")
    @NotNull(message = "密码不能为空")
    @Length(max= 12,message = "密码长度不能超过12位")
    private String password;
}
